<template>
	<scroll-view scroll-x v-if="dataList" class="brand_list">
		<view class="brand_item" v-for="(item, index) in dataList" :key="index" @click="openDetail(item)">
			<image :src="item.logo" class="img"></image>
			<view class="title">{{ item.name }}</view>
		</view>
	</scroll-view>
</template>

<script>
import { configMixin } from './configMixin.js';
export default {
	mixins: [configMixin],
	data() {
		return {};
	},
	methods:{
		openDetail (item) {
			this.$linkTo(`/package/brand/brandDetail/index?id=${item.pk_id}`)
		}
	}
};
</script>

<style lang="scss" scoped>
.brand_list {
	box-sizing: border-box;
	padding: 10rpx 30rpx;
	background-color: #fff;
	overflow: hidden;
	white-space: nowrap;
}
.brand_item {
	display: inline-block;
	margin-right: 24rpx;
	border-radius: 10rpx;
	overflow: hidden;
	width: 214rpx;
	&:last-of-type {
		margin-right: 0;
	}
	.img {
		width: 214rpx;
		height: 214rpx;
	}
	.title {
		padding: 20rpx 0;
		font-weight: bold;
		text-align: center;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}
</style>
